<!DOCTYPE html>
<html lang="zh-CN">
    <head>
    <meta charset="utf-8">

    

    <!-- 渲染优化 -->
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="HandheldFriendly" content="True" >
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <!--icon-->

    
        <link rel="shortcut icon" href="https://s1.imgpp.com/2022/01/28/owl.png">
    
    
    
    
    


    <!-- meta -->


<title>鼠标特效 | 猫头鹰的BLOG</title>


    <meta name="keywords" content="鼠标点击, 鼠标拖动, js特效, 猫头鹰的博客">




    <!-- OpenGraph -->
 
    <meta name="description" content="1.鼠标拖动特效代码：!function() &amp;#123;             function o(w, v, i) &amp;#123;                 return w.getAttribute(v) || i             &amp;#125;             function j(i) &amp;#123;                 return document.g">
<meta property="og:type" content="article">
<meta property="og:title" content="鼠标特效">
<meta property="og:url" content="http://example.com/2022/01/28/%E6%9C%89%E8%B6%A3%E7%89%B9%E6%95%88/index.html">
<meta property="og:site_name" content="猫头鹰的BLOG">
<meta property="og:description" content="1.鼠标拖动特效代码：!function() &amp;#123;             function o(w, v, i) &amp;#123;                 return w.getAttribute(v) || i             &amp;#125;             function j(i) &amp;#123;                 return document.g">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s1.imgpp.com/2022/01/28/pexels-anna-shvets-4588428.jpg">
<meta property="article:published_time" content="2022-01-28T02:00:20.000Z">
<meta property="article:modified_time" content="2022-05-30T14:43:49.567Z">
<meta property="article:author" content="张程">
<meta property="article:tag" content="鼠标点击">
<meta property="article:tag" content="鼠标拖动">
<meta property="article:tag" content="js特效">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://s1.imgpp.com/2022/01/28/pexels-anna-shvets-4588428.jpg">


    
<link rel="stylesheet" href="/css/style/main.css">
 

    
    
    
        <link rel="stylesheet" id="hl-default-theme" href="https://cdn.jsdelivr.net/npm/highlight.js@10.1.2/styles/arduino-light.min.css" media="none" >
        
            <link rel="stylesheet" id="hl-dark-theme" href="https://cdn.jsdelivr.net/npm/highlight.js@10.1.2/styles/obsidian.min.css" media="none">
        
    

    

    
    
<link rel="stylesheet" href="/css/style/dark.css">

    
<script src="/js/darkmode.js"></script>



     
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
 

    <!-- custom head -->

<meta name="generator" content="Hexo 6.0.0"></head>

    <body>
        <div id="app">
            <header class="header">
    <div class="header__left">
        <a href="/" class="button">
            <span class="logo__text">猫头鹰</span>
        </a>
    </div>
    <div class="header__right">
        
            <div class="navbar__menus">
                
                    <a href="/" class="navbar-menu button">首页</a>
                
                    <a href="/tags/" class="navbar-menu button">标签</a>
                
                    <a href="/categories/" class="navbar-menu button">分类</a>
                
                    <a href="/archives/" class="navbar-menu button">归档</a>
                
            </div>
        
        
        
    <a href="/search/" id="btn-search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="24" height="24" fill="currentColor" stroke="currentColor" stroke-width="32"><path d="M192 448c0-141.152 114.848-256 256-256s256 114.848 256 256-114.848 256-256 256-256-114.848-256-256z m710.624 409.376l-206.88-206.88A318.784 318.784 0 0 0 768 448c0-176.736-143.264-320-320-320S128 271.264 128 448s143.264 320 320 320a318.784 318.784 0 0 0 202.496-72.256l206.88 206.88 45.248-45.248z"></path></svg>
    </a>


        
        
    <a href="javaScript:void(0);" id="btn-toggle-dark">
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
    </a>


        
            <a class="dropdown-icon button" id="btn-dropdown" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width='24' height='24' fill="none" stroke="currentColor" stroke-width="0.7" stroke-linecap="round" stroke-linejoin="round"><path fill="currentColor" d="M3.314,4.8h13.372c0.41,0,0.743-0.333,0.743-0.743c0-0.41-0.333-0.743-0.743-0.743H3.314c-0.41,0-0.743,0.333-0.743,0.743C2.571,4.467,2.904,4.8,3.314,4.8z M16.686,15.2H3.314c-0.41,0-0.743,0.333-0.743,0.743s0.333,0.743,0.743,0.743h13.372c0.41,0,0.743-0.333,0.743-0.743S17.096,15.2,16.686,15.2z M16.686,9.257H3.314c-0.41,0-0.743,0.333-0.743,0.743s0.333,0.743,0.743,0.743h13.372c0.41,0,0.743-0.333,0.743-0.743S17.096,9.257,16.686,9.257z"></path></svg></a>
            <div class="dropdown-menus" id="dropdown-menus">
                
                    <a href="/" class="dropdown-menu button">首页</a>
                
                    <a href="/tags/" class="dropdown-menu button">标签</a>
                
                    <a href="/categories/" class="dropdown-menu button">分类</a>
                
                    <a href="/archives/" class="dropdown-menu button">归档</a>
                
            </div>
        
    </div>
</header>


            <main class="main">
    

<div class="post-title">
    <h1 class="post-title__text">
        鼠标特效
    </h1>
    <div class="post-title__meta">
        <a href="/archives/2022/01/" class="post-meta__date button">2022-01-28</a>
        
    <span class="separate-dot"></span><a href="/categories/JavaScript/" class="button">JavaScript</a>

 
        
    
     
    <span id="busuanzi_container_page_pv" hidden>
        <span class="separate-dot"></span>
        <span></span>
        <span id="busuanzi_value_page_pv"></span>
        <span>次观看</span>
    </span>



 

 
    </div>
</div>



<article class="post content-card">
    <div class="post__header">
    
        <div class="post-thumbnail lazy" data-bg="https://s1.imgpp.com/2022/01/28/pexels-anna-shvets-4588428.jpg"></div>
    
</div>
    <div class="post__content">
        <h2 id="1-鼠标拖动特效"><a href="#1-鼠标拖动特效" class="headerlink" title="1.鼠标拖动特效"></a>1.鼠标拖动特效</h2><h4 id="代码："><a href="#代码：" class="headerlink" title="代码："></a>代码：</h4><pre><code class="hljs javascript">!<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
            <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">o</span>(<span class="hljs-params">w, v, i</span>) </span>&#123;
                <span class="hljs-keyword">return</span> w.getAttribute(v) || i
            &#125;
            <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">j</span>(<span class="hljs-params">i</span>) </span>&#123;
                <span class="hljs-keyword">return</span> <span class="hljs-built_in">document</span>.getElementsByTagName(i)
            &#125;
            <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">l</span>(<span class="hljs-params"></span>) </span>&#123;
                <span class="hljs-keyword">var</span> i = j(<span class="hljs-string">&quot;script&quot;</span>),
                w = i.length,
                v = i[w - <span class="hljs-number">1</span>];
                <span class="hljs-keyword">return</span> &#123;
                    <span class="hljs-attr">l</span>: w,
                    <span class="hljs-attr">z</span>: o(v, <span class="hljs-string">&quot;zIndex&quot;</span>, -<span class="hljs-number">1</span>),
                    <span class="hljs-attr">o</span>: o(v, <span class="hljs-string">&quot;opacity&quot;</span>, <span class="hljs-number">0.5</span>),
                    <span class="hljs-attr">c</span>: o(v, <span class="hljs-string">&quot;color&quot;</span>, <span class="hljs-string">&quot;0,0,0&quot;</span>),
                    <span class="hljs-attr">n</span>: o(v, <span class="hljs-string">&quot;count&quot;</span>, <span class="hljs-number">99</span>)
                &#125;
            &#125;
            <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">k</span>(<span class="hljs-params"></span>) </span>&#123;
                r = u.width = <span class="hljs-built_in">window</span>.innerWidth || <span class="hljs-built_in">document</span>.documentElement.clientWidth || <span class="hljs-built_in">document</span>.body.clientWidth,
                n = u.height = <span class="hljs-built_in">window</span>.innerHeight || <span class="hljs-built_in">document</span>.documentElement.clientHeight || <span class="hljs-built_in">document</span>.body.clientHeight
            &#125;
            <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">b</span>(<span class="hljs-params"></span>) </span>&#123;
                e.clearRect(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, r, n);
                <span class="hljs-keyword">var</span> w = [f].concat(t);
                <span class="hljs-keyword">var</span> x, v, A, B, z, y;
                t.forEach(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">i</span>) </span>&#123;
                    i.x += i.xa,
                    i.y += i.ya,
                    i.xa *= i.x &gt; r || i.x &lt; <span class="hljs-number">0</span> ? -<span class="hljs-number">1</span> : <span class="hljs-number">1</span>,
                    i.ya *= i.y &gt; n || i.y &lt; <span class="hljs-number">0</span> ? -<span class="hljs-number">1</span> : <span class="hljs-number">1</span>,
                    e.fillRect(i.x - <span class="hljs-number">0.5</span>, i.y - <span class="hljs-number">0.5</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>);
                    <span class="hljs-keyword">for</span> (v = <span class="hljs-number">0</span>; v &lt; w.length; v++) &#123;
                        x = w[v];
                        <span class="hljs-keyword">if</span> (i !== x &amp;&amp; <span class="hljs-literal">null</span> !== x.x &amp;&amp; <span class="hljs-literal">null</span> !== x.y) &#123;
                            B = i.x - x.x,
                            z = i.y - x.y,
                            y = B * B + z * z;
                            y &lt; x.max &amp;&amp; (x === f &amp;&amp; y &gt;= x.max / <span class="hljs-number">2</span> &amp;&amp; (i.x -= <span class="hljs-number">0.03</span> * B, i.y -= <span class="hljs-number">0.03</span> * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / <span class="hljs-number">2</span>, e.strokeStyle = <span class="hljs-string">&quot;rgba(&quot;</span> + s.c + <span class="hljs-string">&quot;,&quot;</span> + (A + <span class="hljs-number">0.2</span>) + <span class="hljs-string">&quot;)&quot;</span>, e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
                        &#125;
                    &#125;
                    w.splice(w.indexOf(i), <span class="hljs-number">1</span>)
                &#125;),
                m(b)
            &#125;
            <span class="hljs-keyword">var</span> u = <span class="hljs-built_in">document</span>.createElement(<span class="hljs-string">&quot;canvas&quot;</span>),
            s = l(),
            c = <span class="hljs-string">&quot;c_n&quot;</span> + s.l,
            e = u.getContext(<span class="hljs-string">&quot;2d&quot;</span>),
            r,
            n,
            m = <span class="hljs-built_in">window</span>.requestAnimationFrame || <span class="hljs-built_in">window</span>.webkitRequestAnimationFrame || <span class="hljs-built_in">window</span>.mozRequestAnimationFrame || <span class="hljs-built_in">window</span>.oRequestAnimationFrame || <span class="hljs-built_in">window</span>.msRequestAnimationFrame ||
            <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">i</span>) </span>&#123;
                <span class="hljs-built_in">window</span>.setTimeout(i, <span class="hljs-number">1000</span> / <span class="hljs-number">45</span>)
            &#125;,
            a = <span class="hljs-built_in">Math</span>.random,
            f = &#123;
                <span class="hljs-attr">x</span>: <span class="hljs-literal">null</span>,
                <span class="hljs-attr">y</span>: <span class="hljs-literal">null</span>,
                <span class="hljs-attr">max</span>: <span class="hljs-number">20000</span>
            &#125;;
            u.id = c;
            u.style.cssText = <span class="hljs-string">&quot;position:fixed;top:0;left:0;z-index:&quot;</span> + s.z + <span class="hljs-string">&quot;;opacity:&quot;</span> + s.o;
            j(<span class="hljs-string">&quot;body&quot;</span>)[<span class="hljs-number">0</span>].appendChild(u);
            k(),
            <span class="hljs-built_in">window</span>.onresize = k;
            <span class="hljs-built_in">window</span>.onmousemove = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">i</span>) </span>&#123;
                i = i || <span class="hljs-built_in">window</span>.event,
                f.x = i.clientX,
                f.y = i.clientY
            &#125;,
            <span class="hljs-built_in">window</span>.onmouseout = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
                f.x = <span class="hljs-literal">null</span>,
                f.y = <span class="hljs-literal">null</span>
            &#125;;
            <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> t = [], p = <span class="hljs-number">0</span>; s.n &gt; p; p++) &#123;
                <span class="hljs-keyword">var</span> h = a() * r,
                g = a() * n,
                q = <span class="hljs-number">2</span> * a() - <span class="hljs-number">1</span>,
                d = <span class="hljs-number">2</span> * a() - <span class="hljs-number">1</span>;
                t.push(&#123;
                    <span class="hljs-attr">x</span>: h,
                    <span class="hljs-attr">y</span>: g,
                    <span class="hljs-attr">xa</span>: q,
                    <span class="hljs-attr">ya</span>: d,
                    <span class="hljs-attr">max</span>: <span class="hljs-number">6000</span>
                &#125;)
            &#125;
            <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
                b()
            &#125;, <span class="hljs-number">100</span>)
    &#125; ();</code></pre>
<h4 id="效果图："><a href="#效果图：" class="headerlink" title="效果图："></a>效果图：</h4><p><img src="https://s1.imgpp.com/2022/01/29/image4ac0115c1272059d.png" class="lazy" data-srcset="https://s1.imgpp.com/2022/01/29/image4ac0115c1272059d.png" srcset="" alt="效果图"><br>此代码转载CSDN博客的一位博主<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_30394981/article/details/97339401?ops_request_misc=&request_id=&biz_id=102&utm_term=%E9%BC%A0%E6%A0%87%E7%89%B9%E6%95%88js&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-2-97339401.first_rank_v2_pc_rank_v29&spm=1018.2226.3001.4187">源码地址</a></p>
<h2 id="2-鼠标点击特效"><a href="#2-鼠标点击特效" class="headerlink" title="2.鼠标点击特效"></a>2.鼠标点击特效</h2><h4 id="代码：-1"><a href="#代码：-1" class="headerlink" title="代码："></a>代码：</h4><pre><code class="hljs javascript">$(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>&#123;
    <span class="hljs-comment">// 为网页添加一个点击特效：随机显示文字，随机显示颜色</span>
    $(<span class="hljs-string">&quot;body&quot;</span>).click(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) </span>&#123;

        <span class="hljs-comment">// 创建两个数组</span>
        <span class="hljs-keyword">var</span> word= <span class="hljs-keyword">new</span> <span class="hljs-built_in">Array</span>(<span class="hljs-string">&quot;富强&quot;</span>, <span class="hljs-string">&quot;民主&quot;</span>, <span class="hljs-string">&quot;文明&quot;</span>, <span class="hljs-string">&quot;和谐&quot;</span>, <span class="hljs-string">&quot;自由&quot;</span>, <span class="hljs-string">&quot;平等&quot;</span>, <span class="hljs-string">&quot;公正&quot;</span> ,<span class="hljs-string">&quot;法治&quot;</span>, <span class="hljs-string">&quot;爱国&quot;</span>, <span class="hljs-string">&quot;敬业&quot;</span>, <span class="hljs-string">&quot;诚信&quot;</span>, <span class="hljs-string">&quot;友善&quot;</span>);
        <span class="hljs-keyword">var</span> color = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Array</span>(<span class="hljs-string">&quot;#ffcc00&quot;</span>, <span class="hljs-string">&quot;#b870d6&quot;</span>, <span class="hljs-string">&quot;#89ddf3&quot;</span>);

        <span class="hljs-comment">// 创建一个a标签,随机从word数组中选一个写入a中</span>
        <span class="hljs-keyword">var</span> $i = $(<span class="hljs-string">&quot;&lt;a href=&#x27;#&#x27; style=&#x27;text-decoration:none&#x27;/&gt;&quot;</span>).text(word[<span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.random()*word.length)]);

        <span class="hljs-comment">// 获取鼠标点击的位置x，y</span>
        <span class="hljs-keyword">var</span> x = e.pageX,y = e.pageY;
        
        <span class="hljs-comment">// 设置a标签样式</span>
        <span class="hljs-comment">// 注意：一定要设置定位</span>
        $i.css(&#123;
            <span class="hljs-string">&quot;z-index&quot;</span>: <span class="hljs-number">99999999</span>,
            <span class="hljs-string">&quot;top&quot;</span>: y - <span class="hljs-number">20</span>,
            <span class="hljs-string">&quot;left&quot;</span>: x,
            <span class="hljs-string">&quot;position&quot;</span>: <span class="hljs-string">&quot;absolute&quot;</span>,
            <span class="hljs-string">&quot;font-weight&quot;</span>: <span class="hljs-string">&quot;bold&quot;</span>,
            <span class="hljs-string">&quot;color&quot;</span>: color[<span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.random()*color.length)]
        &#125;);

        <span class="hljs-comment">// 将a标签添加到body</span>
        $(<span class="hljs-string">&quot;body&quot;</span>).append($i);

        <span class="hljs-comment">// 设置a标签1.5秒后消失</span>
        $i.animate(&#123;
            <span class="hljs-string">&quot;top&quot;</span>: y - <span class="hljs-number">180</span>,
            <span class="hljs-string">&quot;opacity&quot;</span>: <span class="hljs-number">0</span>
        &#125;,
        <span class="hljs-number">1500</span>,
        <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
            $i.remove();
        &#125;);
    &#125;);
&#125;)</code></pre>
<h4 id="效果图：-1"><a href="#效果图：-1" class="headerlink" title="效果图："></a>效果图：</h4><p><img src="https://s1.imgpp.com/2022/01/29/image25cb42eba4615a6d.png" class="lazy" data-srcset="https://s1.imgpp.com/2022/01/29/image25cb42eba4615a6d.png" srcset="" alt="效果图"></p>

    </div>
     
    <div class="post-footer__meta"><p>更新于 2022-05-30</p></div> 
    <div class="post-entry__tags"><a href="/tags/%E9%BC%A0%E6%A0%87%E7%82%B9%E5%87%BB/" class="post-tags__link button"># 鼠标点击</a><a href="/tags/%E9%BC%A0%E6%A0%87%E6%8B%96%E5%8A%A8/" class="post-tags__link button"># 鼠标拖动</a><a href="/tags/js%E7%89%B9%E6%95%88/" class="post-tags__link button"># js特效</a></div> 
</article>


    <div class="nav">
        <div class="nav__prev">
            
                <a href="/2022/01/28/%E7%BD%91%E7%AB%99%E5%9B%BE%E6%A0%87%E5%88%B6%E4%BD%9C/" class="nav__link">
                    <div>
                        <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M589.088 790.624L310.464 512l278.624-278.624 45.248 45.248L400.96 512l233.376 233.376z" fill="#808080"></path></svg>
                    </div>
                    <div>
                        <div class="nav__label">
                            <!-- Previous Post -->
                            上一页
                        </div>
                        <div class="nav__title">
                            网站图标制作
                        </div>
                    </div>
                </a>
            
        </div>
        <div class="nav__next">
            
                <a href="/2022/01/28/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" class="nav__link">
                    <div>
                        <div class="nav__label">
                            <!-- Next Post -->
                            下一页
                        </div>
                        <div class="nav__title">
                            个人博客搭建
                        </div>
                    </div>
                    <div>
                        <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M434.944 790.624l-45.248-45.248L623.04 512l-233.376-233.376 45.248-45.248L713.568 512z" fill="#808080"></path></svg>
                    </div>
                </a>
            
        </div>
    </div>



    <div class="post__comments content-card" id="comment">
        
    <h4>评论</h4>
    
    
    
    <div id="valine_container" class="valine_thread"></div>

    
    
    
    
    
    
    
    


    </div>



</main>

            <footer class="footer" style="font-size: 10px;">
     
    <a href="#" class="button" id="b2t" aria-label="回到顶部" title="回到顶部">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="32" height="32">
            <path d="M233.376 722.752L278.624 768 512 534.624 745.376 768l45.248-45.248L512 444.128zM192 352h640V288H192z" fill="currentColor"></path>
        </svg>
    </a>

    


    
    
    
        <span id="busuanzi_container_site_uv" hidden>
            <span>游客:</span>
            <span id="busuanzi_value_site_uv"></span>
            <span></span>
            
                <span> </span>
            
        </span>
    
    
        <span id="busuanzi_container_site_pv" hidden>
            <span>次数:</span>
            <span id="busuanzi_value_site_pv"></span>
            <span></span>
            
        </span>
    
 
 

 
    
    
    <p>
        <!-- Powered by <a href="https://hexo.io" target="_blank">Hexo</a> | Theme - <a href="https://github.com/ChrAlpha/hexo-theme-cards" target="_blank">Cards</a> -->
        <span style="color: black;">作者：张程</span>
    </p>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        var a_idx = 0;
            jQuery(document).ready(function($) {
                $("body").click(function(e) {
                    var a = new Array("会当凌绝顶，一览众山小", "春蚕到死丝方尽，蜡炬成灰泪始干", "夕阳无限好，只是近黄昏",
                     "位卑未敢忘忧国", "纸上得来终觉浅，绝知此事要躬行", "人生自古谁无死，留取丹心照汗青", "山重水复疑无路，柳暗花明又一村" ,
                     "小荷才露尖尖角，早有蜻蜓立上头", "床前明月光，疑是地上霜", "春色满园关不住，一枝红杏出墙来", 
                     "山际见来烟，竹中窥落日", "道狭草木长，夕露沾我衣","天长地久有时尽，此恨绵绵无绝期");
                    var color = new Array("#7B7B7B", "#CE0000", "#FF0080","#E800E8","#921AFF","#2828FF",
                    "#0072E3","#00CACA","#02DF82","#00DB00","#8CEA00","#E1E100","#EAC100","#F75000"
                    ,"#B87070","#AFAF61","#6FB7B7","#9999CC","#B766AD");
                    var $i = $("<a href='#' style='text-decoration:none'/>").text(a[a_idx]);
                    a_idx = (a_idx + 1) % a.length;
                    var x = e.pageX,
                        y = e.pageY;
                    $i.css({
                        "z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
                        "top": y - 20,
                        "left": x,
                        "position": "absolute",
                        "font-weight": "bold",
                        "color": color[Math.floor(Math.random()*color.length)]
                    });
                    $("body").append($i);
                    $i.animate({
                            "top": y - 180,
                            "opacity": 0
                        },
                        1500,
                        function() {
                            $i.remove();
                        });
                });
            });
        </script>
    <script>
        !function() {
            function o(w, v, i) {
                return w.getAttribute(v) || i
            }
            function j(i) {
                return document.getElementsByTagName(i)
            }
            function l() {
                var i = j("script"),
                w = i.length,
                v = i[w - 1];
                return {
                    l: w,
                    z: o(v, "zIndex", -1),
                    o: o(v, "opacity", 0.5),
                    c: o(v, "color", "0,0,0"),
                    n: o(v, "count", 99)
                }
            }
            function k() {
                r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
                n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
            }
            function b() {
                e.clearRect(0, 0, r, n);
                var w = [f].concat(t);
                var x, v, A, B, z, y;
                t.forEach(function(i) {
                    i.x += i.xa,
                    i.y += i.ya,
                    i.xa *= i.x > r || i.x < 0 ? -1 : 1,
                    i.ya *= i.y > n || i.y < 0 ? -1 : 1,
                    e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);
                    for (v = 0; v < w.length; v++) {
                        x = w[v];
                        if (i !== x && null !== x.x && null !== x.y) {
                            B = i.x - x.x,
                            z = i.y - x.y,
                            y = B * B + z * z;
                            y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
                        }
                    }
                    w.splice(w.indexOf(i), 1)
                }),
                m(b)
            }
            var u = document.createElement("canvas"),
            s = l(),
            c = "c_n" + s.l,
            e = u.getContext("2d"),
            r,
            n,
            m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
            function(i) {
                window.setTimeout(i, 1000 / 45)
            },
            a = Math.random,
            f = {
                x: null,
                y: null,
                max: 20000
            };
            u.id = c;
            u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
            j("body")[0].appendChild(u);
            k(),
            window.onresize = k;
            window.onmousemove = function(i) {
                i = i || window.event,
                f.x = i.clientX,
                f.y = i.clientY
            },
            window.onmouseout = function() {
                f.x = null,
                f.y = null
            };
            for (var t = [], p = 0; s.n > p; p++) {
                var h = a() * r,
                g = a() * n,
                q = 2 * a() - 1,
                d = 2 * a() - 1;
                t.push({
                    x: h,
                    y: g,
                    xa: q,
                    ya: d,
                    max: 6000
                })
            }
            setTimeout(function() {
                b()
            }, 100)
    } ();
    </script>
</footer>

        </div>
        
    <script defer src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script>
    <script>
        window.lazyLoadOptions = {
            elements_selector: ".lazy",
            threshold: 0
        };
    </script>
 

 

 

 

 



 



 


    
 


    
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>

    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.4.1/dist/jquery.fancybox.min.css">

    
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.4.1/dist/jquery.fancybox.min.js"></script>

    <script>
        let lazyloadT = Boolean('true'),
            auto_fancybox = Boolean('false')
        if (auto_fancybox) {
            $(".post__content").find('img').each(function () {
                var element = document.createElement("a");
                $(element).attr("data-fancybox", "gallery");
                $(element).attr("href", $(this).attr("src"));
                if (lazyloadT) {
                    $(element).attr("href", $(this).attr("data-srcset"));
                }
                $(this).wrap(element);
            });
        } else {
            $(".post__content").find("fancybox").find('img').each(function () {
                var element = document.createElement("a");
                $(element).attr("data-fancybox", "gallery");
                $(element).attr("href", $(this).attr("src"));
                if (lazyloadT) {
                    $(element).attr("href", $(this).attr("data-srcset"));
                }
                $(this).wrap(element);
            });
        }
    </script>
 

 

 

 

 


    

    
    
    
    <script>
        function loadComment() {
            let e;
            (e = document.createElement("script")).src = 'https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js',
            document.body.appendChild(e);
            e.onload = () => {
                var valineConfig = {"appId":"c21JqSBfScFdueO44Scwp9Ba-gzGzoHsz","appKey":"apETP0QIekHzRXjTHvOnrQmS","placeholder":null,"path":null,"avatar":"retro","meta":["nick","mail","link"],"pageSize":null,"lang":null,"visitor":null,"highlight":null,"avatarForce":null,"recordIP":null,"serverURLs":null,"enableQQ":true,"requiredFields":["nick","mail"],"emojiCDN":null,"emojiMaps":null};
                valineConfig.el = '#valine_container';
                for (var i in valineConfig) {
                    if (valineConfig[i] === null) delete valineConfig[i];
                }
                new Valine(valineConfig);
            };
        }
    
        var runningOnBrowser = typeof window !== "undefined";
        var isBot = runningOnBrowser && !("onscroll" in window) || typeof navigator !== "undefined" && /(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent);
        var supportsIntersectionObserver = runningOnBrowser && "IntersectionObserver" in window;
    
        setTimeout(function () {
            if (!isBot && supportsIntersectionObserver) {
                var comment_observer = new IntersectionObserver(function(entries) {
                    if (entries[0].isIntersecting) {
                        loadComment();
                        comment_observer.disconnect();
                    }
                }, { threshold: [0] });
                comment_observer.observe(document.getElementById('comment'));
            } else {
                loadComment();
            }
        }, 1);
    </script>


    
    
    
    
    

    
    
    
    
    

    
    
    



    </body>
</html>
